<?php
namespace app\home\controller;
use think\Db;
class Fuwu extends Base
{
    public function fuwu()
    {
    	$this->base();
		$team = Db::name("service_team")->order("team_id")->limit(3)->select();
		foreach($team as $k=>$v){
			$team[$k]['tpics'] = Db::name("teampic")->field('team_pic')->where("team_id",$v['team_id'])->limit(3)->select();
			$team[$k]['lpic'] = Db::name("leader")->field("leader_pic")->where("leader_id",$v['leader_id'])->find();
			$team[$k]['lpic']['leader_pic'] = $team[$k]['lpic']['leader_pic']==null?'default.png':$team[$k]['lpic']['leader_pic'];
		}
//		dump($team);die;
		$this->assign("teams",$team);
    	return $this->fetch();
//      return '<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:) </h1><p> ThinkPHP V5.1<br/><span style="font-size:30px">12载初心不改（2006-2018） - 你值得信赖的PHP框架</span></p></div><script type="text/javascript" src="https://tajs.qq.com/stats?sId=64890268" charset="UTF-8"></script><script type="text/javascript" src="https://e.topthink.com/Public/static/client.js"></script><think id="eab4b9f840753f8e7"></think>';
    }

    public function hello($name = 'ThinkPHP5')
    {
        return 'hello,' . $name;
    }
}
